<style>
    .word{
        line-height: 30px;
        white-space: nowrap;
        display: inline-block;
        height: 25px;
        overflow: hidden;
        cursor: text;
        text-align: left;
        padding: 2px 4px;
        -moz-border-radius: 4px;
        -webkit-border-radius: 4px;
        border-radius: 4px;
        resize: none;
        color: #333333;
        background-color: #FFF;
        border: solid 1px #D7D7D7;
        outline: none;
    }
</style>
<include file="common:__head__"/>
<div class="permissions-tabs">
    <a class="role tabs-bg" href="{:U('Brand/index')}">品牌管理</a>
</div>
<div class="permissions-content">
    <div class="permissions-le" style="width: 98%;">
        <div class="message-set">
            <span class="hints">操作提示</span>
            <span class="hints-dec">代理等级管理和添加,自由设置代理级别是否包邮！</span>
        </div>
        <form class="form form-horizontal col-xs-6 form-border radius" id="save_rank" method="post" action="{:U('Agent/edit_rank')}">
        <input type="hidden" name="rank_id" value="{$rank['rank_id']}"/>
        <div class="add-admin-ipt">
            <span><i>*</i>所属品牌:</span>
            <div class="add-admin-opt">
                <input type="text" class="input-text" value="{:GetBrandNameById($rank['brand_id'])}" disabled/>
            </div>
        </div>
        <div class="add-admin-ipt">
            <span><i>*</i>上级代理:</span>
            <div class="add-admin-opt">
                <input type="text" class="input-text" value="{$rank['p_name']}" disabled/>
            </div>
        </div>
        <div class="add-admin-ipt">
            <span><i>*</i>层级名称:</span>
            <div class="add-admin-opt">
                <input type="text" class="input-text" id="c_name" name="rank_name" value="{$rank['rank_name']}"/>
            </div>
        </div>
        <!--<div class="add-admin-ipt">-->
            <!--<span><i>*</i>层级福利:</span>-->
            <!--<div class="add-admin-opt">-->
                <!--<textarea class="input-text" name="welfare" style="min-height:100px;width: 300px">{$rank['welfare']}</textarea>-->
            <!--</div>-->
        <!--</div>-->
            <div class="add-admin-ipt">
                <span><i>*</i>层级福利</span>
                <textarea name="welfare" class="txt-area w300">{$rank['welfare']}</textarea>
            </div>
        <div class="add-admin-ipt">
            <span></span>
            <input type="submit" name="" value="保存" class="sbm"/>
        </div>
        </form>
    </div>
</div>
<include file="common:__foot__"/>


<block name="js">
<script type="text/javascript">
    $(function(){
        $('.sbm').click(function () {
            var c_name = $('#c_name').val();
            if (c_name == '') {
                layer.alert('层级名称必填！');
                return false;
            }
            $("#save_rank").submit();
        });
    });
</script>
</block>